﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="Frogism.Core"
                   namespace="Frogism.Core">

  <class name="Book">
    <id name="Id">
      <generator class="identity" />
    </id>
    <property name="Title" />
    <property name="LastPageNumber" column="TotalPages" />
    <property name="GoalYear" column="Year" />
    <property name="Priority" />
    <property name="IsFinished" />
    <property name="IndexLength" />
    <property name="Factor" />
    <property name="GenreId" />
    <property name="Rating" />
    <property name="IsPrivate" />
    <many-to-one  name ="Author" class="Author" column="AuthorId" lazy="false" />
    <bag name="Reads" lazy="false">
      <key column="BookId" />
      <one-to-many class="Read"  />
    </bag>
  </class>
</hibernate-mapping>